#include <stdio.h>

int main(void)
{
	//输入原始数据并简单处理
	float shuru = 0;
	scanf("%f", &shuru);
	shuru *= 0.01;
	//换算英尺
	float huansuan = shuru / 0.3048;
	int foot = (int)huansuan;//截断
	//换算英寸
	int inch = (int)((huansuan - foot)*12);
	//输出
	printf("%d %d", foot, inch);

	return 0;
}